package com.fh.mq;


import java.io.UnsupportedEncodingException;

import org.apache.log4j.Logger;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageListener;
import org.springframework.stereotype.Component;

/**
 * b status
 * 
 * @author
 * 
 *
 */
@Component("borrowStatusQueueListenter")
public class BorrowStatusQueueListenter implements MessageListener {

	private static final Logger log = Logger
			.getLogger(BorrowStatusQueueListenter.class);


	@Override
	public void onMessage(Message arg0) {
		byte[] body = arg0.getBody();
		String res = null ;
		try {
			 res = new String(body, "UTF-8");
		
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		System.out.println(res);
	}

	
}